package com.rimi.service.impl;

import com.rimi.bean.User;
import com.rimi.mapper.UserMapper;
import com.rimi.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @
 * @author:liangLi
 * @time:2020/7/6 12:46
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userMapper;
    @Override
    public User login(User user) {
        return userMapper.loginWithUsernameAndPassword(user);
    }



    @Override
    public User loginWithUsername(User user) {

        return userMapper.loginWithUsername(user);
    }

    @Override
    public User findUserById(Integer userId) {
        return userMapper.findUserById(userId);
    }
}
